package com.yatop.lalmbda.ai.model;


import com.yuyaogc.lowcode.engine.annotation.*;
import com.yuyaogc.lowcode.engine.plugin.activerecord.Model;
import com.yuyaogc.lowcode.engine.util.enums.DataTypeEnum;

import java.sql.Timestamp;

@Table(displayName = "任务明细表", name = "ai_task_detail")
public class TaskDetail extends Model<TaskDetail> {

    @Id
    private Long id;

    @ManyToOne(displayName = "任务")
    @JoinColumn(name = "talk_id")
    private Task task;

    @Column(label = "用户id")
    private Long userId;

    @Column(label = "任务id", name = "task_id")
    private String taskId;

    @Column(label = "请求id", name = "request_id")
    private String requestId;

    @Column(label = "任务名称",name = "task_name")
    private String taskName;

    @Column(label = "任务内容", type = DataTypeEnum.TEXT, name = "task_context")
    private String taskContext;

    @Selection(options = {
            @Option(label = "图片", value = "jpg"),
            @Option(label = "文本", value = "text")
    })
    private String taskType;

    @Column(label = "任务开始时间",name = "task_begin_time")
    private Timestamp taskBeginTime;

    @Column(label = "任务结束时间",name = "task_end_time")
    private Timestamp taskEndTime;


    @Column(label = "创建时间",name = "create_time")
    private Timestamp createTime;

    @Column(label = "更新时间", name = "update_time")
    private Timestamp updateTime;

    public Long getId() {
        return (Long) this.get("id");
    }

    public TaskDetail setId(Long id) {
        this.set("id", id);
        return this;
    }

    public Task getTask() {
        return (Task) this.get("task");
    }

    public TaskDetail setTask(Task task) {
        this.set("task", task);
        return this;
    }

    public Long getUserId() {
        return (Long) this.get("userId");
    }

    public TaskDetail setUserId(Long userId) {
        this.set("userId", userId);
        return this;
    }

    public String getTaskId() {
        return (String) this.get("taskId");
    }

    public TaskDetail setTaskId(String taskId) {
        this.set("taskId", taskId);
        return this;
    }

    public String getRequestId() {
        return (String) this.get("requestId");
    }

    public TaskDetail setRequestId(String requestId) {
        this.set("requestId", requestId);
        return this;
    }

    public String getTaskName() {
        return (String) this.get("taskName");
    }

    public TaskDetail setTaskName(String taskName) {
        this.set("taskName", taskName);
        return this;
    }

    public String getTaskContext() {
        return (String) this.get("taskContext");
    }

    public TaskDetail setTaskContext(String taskContext) {
        this.set("taskContext", taskContext);
        return this;
    }

    public String getTaskType() {
        return (String) this.get("taskType");
    }

    public TaskDetail setTaskType(String taskType) {
        this.set("taskType", taskType);
        return this;
    }

    public Timestamp getTaskBeginTime() {
        return (Timestamp) this.get("taskBeginTime");
    }

    public TaskDetail setTaskBeginTime(Timestamp taskBeginTime) {
        this.set("taskBeginTime", taskBeginTime);
        return this;
    }

    public Timestamp getTaskEndTime() {
        return (Timestamp) this.get("taskEndTime");
    }

    public TaskDetail setTaskEndTime(Timestamp taskEndTime) {
        this.set("taskEndTime", taskEndTime);
        return this;
    }

    public Timestamp getCreateTime() {
        return (Timestamp) this.get("createTime");
    }

    public TaskDetail setCreateTime(Timestamp createTime) {
        this.set("createTime", createTime);
        return this;
    }

    public Timestamp getUpdateTime() {
        return (Timestamp) this.get("updateTime");
    }

    public TaskDetail setUpdateTime(Timestamp updateTime) {
        this.set("updateTime", updateTime);
        return this;
    }
}
